<% if @json["diagnostic"]["status"] == 200 %>
    alert('add room success!');
<% else %>
    alert('something wrong <%= @json["diagnostic"] %>');
<% end %>